package com.lmqb.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lmqb.bean.LmMachineCheckLog;
import com.lmqb.dao.LmMachineCheckLogMapper;
import com.lmqb.service.LmMachineCheckLogService;
import com.lmqb.util.StrUtil;

@Service("lmMachineCheckLogService")
public class LmMachineCheckLogServiceImpl implements LmMachineCheckLogService{

	@Autowired
	private LmMachineCheckLogMapper lmMachineCheckLogDao;
	
	//通过userId查询
	public List<LmMachineCheckLog> selectAllByuserId(Integer userId) {
		List<LmMachineCheckLog> list = lmMachineCheckLogDao.selectAllByuserId(userId);
		if(list.size()>0){
			for(int i=0;i<list.size();i++){
				if(list.get(i).getCreateTime()!=null){
				list.get(i).setCreateTimeD(StrUtil.intToTime(list.get(i).getCreateTime()));
				}
			}
		}
		return list;
	}

}
